<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8" />
		<title></title>
	</head>
	<link rel="stylesheet" href="../css/common.css" />
	<style>		
		#Pagination input{
			font-family: "微软雅黑";
			font-size: 12px;
		}
		#Pagination i{
			font-style: normal;
		}
		#Pagination .nextPage{
			color:#fd767a;
		}
		#Pagination{
			width:1144px;
			height:44px;
			background:white;
			line-height: 44px;
			position: fixed;
			bottom: 0;
		}
		#Pagination select{
			width:50px;
			height:20px;
			outline: none;
		}
		#Pagination .page{
			width:22px;
			height:16px;
			outline: none;
		}
		#Pagination span{
			margin-right:20px;
			cursor: pointer;
		}
		#Pagination .floatRight{
			float: right;
			margin-right:20px;
		}
		#Pagination .floatRight span{
			margin:0;
		}
	</style>
	<body>
		<div style='height:44px;background:#eeeeee;width: 1144px;'></div>
		<div id='Pagination'>
			<div style='height:4px;background:#f1f1f1;'></div>
			<span style='margin-left:4px;'>
				<select class='pageSize'>
					<option>20</option>
					<option>50</option>
					<option>100</option>
					<option>200</option>
					<option>500</option>	
					<option>1000</option>			
				</select>
			</span>
			<span class='indexPage'>首页</span>
			<span class='prePage'>上一页</span>
			<span class='toPage'>跳转到第 <input class='page' value="1" type='text'/> 页</span>
			<span class='nextPage'>下一页</span>
			<span class='lastPage'>尾页</span>
			<div class='floatRight'>
				<i>共<span class='totalAmount'></span>条</i>
				<i style='margin-right:20px'><span class='totalPage' style='color:#d20808;'></span>页</i>
				<i>第<span class='nowPage'></span>页</i>
			</div>
		</div>		
		<script>
		/*___________________________________________分页______________________________________________*/
			 	//选择每页的条数
				$(".pageSize").change(function(){
					$('.page').val('1')
					getAjax()
			   })
			   //首页
				$(".indexPage").click(function(){
					var pageNum = $('.page').val('1');
					$(document).scrollTop(0)
					getAjax()
			   })
			   //上一页
				$(".prePage").click(function(){
					var pageNum = $('.page').val();	
					if(pageNum == 1){
						$(document).scrollTop(0)
					}else{
						$('.page').val(pageNum-1);
					}
					$(document).scrollTop(0)
					getAjax()
			   })
			   //跳转到第几页	
					$('.page').keypress(function(){
						if(event.keyCode ==13){			
							if($('.page').val()<=totalPage){
								var pageNum = $('.page').val();
								$(document).scrollTop(0)
								getAjax()
							}else{
								var pageNum = $('.page').val(totalPage)
								$(document).scrollTop(0)
								getAjax()
							}					
						}
					})
			 
			   //下一页
				$(".nextPage").click(function(){
					var pageNum = $('.page').val();	
					if(pageNum == totalPage){
						$('.page').val(totalPage);
					}else{
						$('.page').val(pageNum-0+1);
					}	
					$(document).scrollTop(0)
					getAjax();
			   })
			   //尾页
				$(".lastPage").click(function(){
					var pageNum = $('.page').val(totalPage);
					$(document).scrollTop(0)
					getAjax();
			   })
	  
		</script>
	</body>
</html>
